Skip to content

test(claimant): pin prompt.md constants to claimant.py/poll.py by sync check (#8366) - #11219

Merged
dezren39 merged 1 commit into
mainfrom
queue/20130-8366-prompt-constants
Nov 17, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/20130-8366-prompt-constants

Conversation

@dezren39

@dezren39 dezren39 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Closes #8366 via route (b), pin-by-check — the triage recommendation recorded on the issue: prompt.md is hand-tuned prose, so rather than generating it, a new test fails the moment any machine-checkable restatement drifts from claimant.py/poll.py. That is the drift the #7772 Phase 4 audit had to repair by hand (prompt.md's queue-CLI path stale in two places against REPO_QUEUE_CMD).

What changed

  • test_prompt_constants.py (new, 11 tests): pins the four queue names, the REPO_QUEUE_CMD path, the 36 concurrency cap (both prompt statements), the OpenCode server URL, both launched-by recovery markers, the 30-minute activity window and 2-hour zombie threshold, the mode-file and fire-log paths, the worker name, the route defaults, the held-issue labels, and the primary clone — and pins claimant.py vs poll.py equality for the shared constants, so code-side drift between the two modules is caught too. Its docstring is the required inventory: every machine-checkable restatement in prompt.md is either pinned or explicitly exempted with a reason (the provider-wall recovery marker, credential-adjacent paths, poll-internal tuning constants).
  • run_hermetic_tests.py: the new suite is wired into the hermetic runner.
  • test_harness_safety.py: the black-box fixture stubs the new module exactly like the existing suites (found by running it — the fixture's fixed file list initially missed the new module).

Verification

  • Deliberate mismatch, per the acceptance: editing only claimant.py's CONCURRENCY_CAP 36 → 37 makes the check fail; reverting restores green.
  • Hermetic suite: 154 tests OK. test_harness_safety OK. test_claimant (40), test_poll (95), test_claimant_args (5), test_launch_one (28), test_dispatch_batch (12), test_send_to_opencode (15) all OK.

Task 20130, lane any-l.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…c check (#8366)

Route (b) from the issue, per the triage recommendation: prompt.md is hand-tuned prose, so instead of generating it, test_prompt_constants.py fails when any machine-checkable restatement drifts from the code — the drift the #7772 audit repaired by hand (stale queue-CLI path vs REPO_QUEUE_CMD).

Pinned: the four queue names, REPO_QUEUE_CMD path, the 36 concurrency cap (both statements), the OpenCode server URL, both launched-by recovery markers, the 30-min activity window and 2-h zombie threshold, mode/fire-log paths, the worker name, route defaults, held-issue labels, and the primary clone — plus claimant/poll cross-module equality for the shared constants. The test docstring carries the full inventory with exemptions and reasons (provider-wall marker, credential-adjacent paths, poll-internal tuning).

Wired into run_hermetic_tests.py; test_harness_safety fixture stubs the new module like the existing suites. Deliberate mismatch verified: CONCURRENCY_CAP 36->37 in claimant.py only makes the check fail; reverting restores green. Suites: hermetic 154 OK, test_harness_safety OK, test_claimant/test_poll/test_claimant_args/test_launch_one/test_dispatch_batch/test_send_to_opencode all OK.
@dezren39
dezren39 requested a review from a team as a code owner November 17, 2026 10:27
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T10:27:16.913072Z
We couldn’t complete this review. Comment @codex review to try again.
67fc302 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6060f4b6-f3d7-46f4-b7d9-19baab2a8597
Commits

Reviewing files that changed from the base of the PR and between 227c533 and 67fc302.

Files selected for processing: 3

  • pm-stack/opencode-claimant/run_hermetic_tests.py
  • pm-stack/opencode-claimant/test_harness_safety.py
  • pm-stack/opencode-claimant/test_prompt_constants.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 merged commit 4d96390 into main Nov 17, 2026
1 check passed
@dezren39
dezren39 deleted the queue/20130-8366-prompt-constants branch November 17, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opencode-claimant: prompt.md constants drift from claimant.py — generate them or pin them by a sync check (#7772 disposition e)

1 participant